package com.mobzilla.model;

public enum Status {

	NEW("NEW"), ASSIGNED("ASSIGNED"), RESOLVED("RESOLVED");

	private String value;

	private Status(String str) {
		this.value = str;
	}

	public String getValue() {
		return value;
	}

	@Override
	public String toString() {
		return value;
	}
	
	public static Status getStatusFromString(String s)
	{
		if(NEW.getValue().equals(s))
		{
			return NEW;
		}
		else if(ASSIGNED.getValue().equals(s))
		{
			return ASSIGNED;
		}
		else if(RESOLVED.getValue().equals(s))
		{
			return RESOLVED;
		}
		
		return NEW;
	}
}
